const prefix = '/api';
const suffix = '.do';

const urlMap = {
   'dev': {
		'登录': '/sign',
		'退出登录': '/signout',
		'注册用户时发送验证码': '/sendCodeForSignup',
		'发送验证码(已登录)': '/sendVerifyCode2',
		'发送验证码(未登录)': '/sendVerifyCode1',
		'用户注册(2/1 用户基本信息)': '/signup',
		'用户注册(2/2 用户银行信息)': '/signupForBank',
		'用户详情': '/agencyDetail',
		'编辑用户基本信息': '/updateAgency',
		'用户银行信息详情': '/agencyBankDetail',
		'编辑用户银行信息': '/updateAgencyBank',
		'创建站点配置': '/createAgencySiteAudit',
		'编辑站点配置': '/updateAgencySiteAudit',
		'站点配置详情': '/agencyExtendUrlInfo',
		'游戏列表': '/gameListOfAgency',
		'消费明细': '/agencyProfitRecordList',
		'我的结算': '/agencyProfitSettleList',
		
   }
};

export const urlService = (type: string, key: string) => {
   const url = urlMap[type][key];
   if (url) {
		return prefix + urlMap[type][key] + suffix;
   } else {
		throw Error(`fail to find url: ${key}`);
   }
};

